package com.dit.serviceImpl;

import java.util.Calendar;

import com.dit.entity.AbstractEntity;
import com.dit.entity.Sme;
import com.dit.service.GenericService;

public abstract class AbstractService {

	public void setInsertSettings(AbstractEntity entity, String userId) {

		Calendar calender = Calendar.getInstance();

		entity.setInsertDateTime(calender.getTime());

		entity.setUpdateDateTime(calender.getTime());
		entity.setInsertUser(userId);
		entity.setUpdateUser(userId);
		entity.setIsEnabled(true);

	}

	public void setUpdateSettings(AbstractEntity entity, String userId) {
		Calendar calender = Calendar.getInstance();

		entity.setUpdateDateTime(calender.getTime());
		entity.setUpdateUser(userId);
	}

}
